<layout name='Layout/layout_page' />

	<ol class="breadcrumb">
		<li><a href="<{:U('Goods/index')}>">Goods</a></li>
      	<li class="active"><{:L('_public_edit')}></li>
    </ol>

	<form id="ajaxForm" action="<{:U('Goods/update')}>" method="post" class="form-horizontal form-validata">		

		<div class="form-group">
			<label class="col-md-2 control-label" for="name">Name</label>
			<div class="col-md-9">
				<input type="text"
                class="form-control"
				name="name"
				id="name"
				value="<{$list.name}>" 
				data-rule-required="true"
				/>
			</div>
		</div>		

		<div class="form-group">
			<label class="col-md-2 control-label" for="picname">thumbnail</label>
			<div class="col-md-9">
				<empty name="list.picname">
				<img class="thumbPic" id="picname_src" src="<{:STATICS}>/image/image.jpg" />
				<else/>
				<img class="thumbPic" id="picname_src" src="<{$list.picname}>" />
				</empty>				
				<input type="hidden" name="picname" id="picname" value="<{$list.picname}>" />
				<p class="pic-btn"><input type="button" value="Upload" class="btn btn-default btn-sm" onclick="uploadImage( '<{:U('Admin/Upload/singleImage')}>' , 'picname')"/> <input type="button" value="Delete" class="btn btn-default btn-sm" onclick="delImage('picname')"/></p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label" for="keywords">Content</label>
			<div class="col-md-9">
				<textarea name="content" class="form-control areatext" style="height:200px"><{$list.content}></textarea>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label" for="name">Price</label>
			<div class="col-md-2">
				<input type="text"
                class="form-control"
				name="price"
				id="price"
				value="<{$list.price}>" 
				data-rule-required="true"
				data-rule-number="true"
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label" for="sort">Sell Number</label>
			<div class="col-md-2">
				<input type="text"
                class="form-control"
				class="input-small"
				name="sellNumber"
				id="sellNumber"
				value="<{$list.sellNumber}>" 
				data-rule-required="true"
				data-rule-number="true"
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label" for="sort">Sort</label>
			<div class="col-md-2">
				<input type="text"
                class="form-control"
				class="input-small"
				name="sort"
				id="sort"
				value="<{$list.sort}>" 
				data-rule-required="true"
				data-rule-number="true"
				/>
				<p>The smaller the number, the more forward</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label" for="name">Show</label>
			<div class="col-md-3">
				<label class="radio-inline">
					<input type="radio" name="show" value="1" <php>if($list['show']==='1')echo checked;</php>> Yes
				</label>
				<label class="radio-inline">
					<input type="radio" name="show" value="0" <php>if($list['show']==='0')echo checked;</php>> No
				</label>
			</div>
		</div>		

		<div class="form-group">
			<div class="col-md-5 col-sm-offset-2">
				<button type="submit" class="btn btn-info"><{:L('_public_edit')}></button>
			</div>
		</div>

		<div style="height:200px"></div>
		<input type="hidden" name="id" value="<{$list['id']}>">
	</form>


<input type="hidden" id="menu_action" value="goods" />